package com.rightsidetech.mall.entity;

import java.io.Serializable;

/**
 * mall_base_info_tag
 * @author 
 */
public class MallBaseInfoTag implements Serializable {
    /**
     * 主键
     */
    private Long id;

    /**
     * 基础商品id
     */
    private Long baseInfoId;

    /**
     * 商品标签 0-商品 1-赠品 2-积分商品
     */
    private Byte commodityTag;

    /**
     * 是否创建过商品
     */
    private Byte isCommodityAdd;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getBaseInfoId() {
        return baseInfoId;
    }

    public void setBaseInfoId(Long baseInfoId) {
        this.baseInfoId = baseInfoId;
    }

    public Byte getCommodityTag() {
        return commodityTag;
    }

    public void setCommodityTag(Byte commodityTag) {
        this.commodityTag = commodityTag;
    }

    public Byte getIsCommodityAdd() {
        return isCommodityAdd;
    }

    public void setIsCommodityAdd(Byte isCommodityAdd) {
        this.isCommodityAdd = isCommodityAdd;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MallBaseInfoTag other = (MallBaseInfoTag) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBaseInfoId() == null ? other.getBaseInfoId() == null : this.getBaseInfoId().equals(other.getBaseInfoId()))
            && (this.getCommodityTag() == null ? other.getCommodityTag() == null : this.getCommodityTag().equals(other.getCommodityTag()))
            && (this.getIsCommodityAdd() == null ? other.getIsCommodityAdd() == null : this.getIsCommodityAdd().equals(other.getIsCommodityAdd()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBaseInfoId() == null) ? 0 : getBaseInfoId().hashCode());
        result = prime * result + ((getCommodityTag() == null) ? 0 : getCommodityTag().hashCode());
        result = prime * result + ((getIsCommodityAdd() == null) ? 0 : getIsCommodityAdd().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", baseInfoId=").append(baseInfoId);
        sb.append(", commodityTag=").append(commodityTag);
        sb.append(", isCommodityAdd=").append(isCommodityAdd);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}